{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 线性回归演示\n",
    "作者：周伟光\n",
    "本报告旨在通过一个简单的例子，阐述一元线性回归。\n",
    "本代码具体的说明，请看《手把手教你用Python写线性回归》:\n",
    "http://blog.csdn.net/juwikuang/article/details/78420337"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Data Exploration\n",
    "数据来源于周伟光自己的文章《一个公式告诉你为什么程序员要转算法工程师》\n",
    "\n",
    "http://blog.csdn.net/juwikuang/article/details/73057194"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "x = [13854,12213,11009,10655,9503] #程序员工资，顺序为北京，上海，杭州，深圳，广州\n",
    "x = np.reshape(x,newshape=(5,1)) / 10000.0\n",
    "y =  [21332, 20162, 19138, 18621, 18016] #算法工程师，顺序和上面一致\n",
    "y = np.reshape(y,newshape=(5,1)) / 10000.0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.PathCollection at 0x15b1801b160>"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAD8CAYAAABw1c+bAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAE49JREFUeJzt3WGMXeWd3/Hvr86wOwWSYetZEo89cTZFBhQCjqYkKlVLuloGokp4aaUuqiBis/KLZjcgJRY1L4q0SA2V26iJ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19K6INn/D2X5AngVmB5koPAw8AQQFVtBp4BPgUcAH4C3DeYSvtjsflI8n5gCngv8HaSB4Drq+r4gEo+bzr4v/EfgX8E/PdW5p28VD+srIO5+NfMnSCdAGaBfzvvYu8lpYO56P0xL9G5lCSdgUs9ktQwBr8kNYzBL0kNY/BLUsMY/JLUMAa/JDWMwS9JDWPwS1LD/H+2xOYDSmjprwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(x,y)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 数据分析 Data Analysis\n",
    "看样子像一条直线"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 算法采用 Algorithm\n",
    "\n",
    "铁三角：\n",
    "\n",
    "模型 Model\n",
    "\n",
    "损失函数 Cost Function\n",
    "\n",
    "优化方法 Optimization Method \n",
    "\n",
    "模型 -> 损失函数 -> 优化方法"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "def model(a, b, x):\n",
    "    return a*x + b\n",
    "\n",
    "def cost_function(a, b, x, y):\n",
    "    n = 5\n",
    "    return 0.5/n * (np.square(y-a*x-b)).sum()\n",
    "\n",
    "def optimize(a,b,x,y):\n",
    "    n = 5\n",
    "    alpha = 1e-1\n",
    "    y_hat = model(a,b,x)\n",
    "    da = (1.0/n) * ((y_hat-y)*x).sum()\n",
    "    db = (1.0/n) * ((y_hat-y).sum())\n",
    "    a = a - alpha*da\n",
    "    b = b - alpha*db\n",
    "    return a, b\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "初始化"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "a = 0\n",
    "b = 0"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "第一次遍历"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "def iterate(a,b,x,y,times):\n",
    "    for i in range(times):\n",
    "        a,b = optimize(a,b,x,y)\n",
    "\n",
    "    y_hat=model(a,b,x)\n",
    "    cost = cost_function(a, b, x, y)\n",
    "    print(a,b,cost)\n",
    "    plt.scatter(x,y)\n",
    "    plt.plot(x,y_hat)\n",
    "    return a,b"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.22441501579999998 0.19453800000000002 1.1195136204857177\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAD8CAYAAABw1c+bAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAE31JREFUeJzt3X+MpdV93/H3Z2dn2QH/ALyT2FlYL22QE1c2YE2xK0cxrhRYkBqwE7XQyCFurFVbkzRWa8X0DyOBFDdyf8mSY7JNV1tLzVIpBkpVO2vUNKWNQ8UQU8B2sLckEcMi7cYLdh0vsD++/WPu7Nw7P+/O3L13ds77JV3tPOec594zj9BnDt/nzDOpKiRJ7dgy6glIkobL4Jekxhj8ktQYg1+SGmPwS1JjDH5JaozBL0mNMfglqTEGvyQ1ZuuoJ7CUHTt21O7du0c9DUm6YDz55JN/WVWT/YzdkMG/e/dupqenRz0NSbpgJPmLfsda6pGkxhj8ktQYg1+SGmPwS1JjDH5JaozBL0mNMfglqTEbch+/JG1GD3/9RT576DmOvHKCH7t0gk/e9A5uu27n0Odh8EvSEDz89Re5+8FnOHHyNAAvvnKCux98BmDo4W+pR5KG4LOHnjsb+nNOnDzNZw89N/S5GPySNARHXj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Z/kaJJnl+lPks8lOZzk6STvGfYch6mP6/ETSf44yWtJ/tmw5zdMfVyLX+j8N/F0kq8l2bR/SKKPa3Fr5zo8lWQ6yU8Ne47Dstq16Br3N5OcTvLz6/1Mg3/wDgB7Vui/Gbi689oLfGEIcxqlA6x8PY4Dvwr8y6HMZrQOsPK1+DPgA1X1buA+Nnet+wArX4v/BlxTVdcC/wD4nWFMakQOsPK1IMkY8JvAoUF8oME/YFX1GLNhtpxbgS/WrMeBS5O8bTizG77VrkdVHa2qJ4CTw5vVaPRxLb5WVS93Dh8HrhjKxEagj2vxg5q/AXkJsGlvRvaRGQC/AnwJODqIzzT4h28n8ELX8UynTer2y8BXRj2JUUryoSR/CvxXZlf9TUqyE/gQcP+g3tPgH76l/lr7pl3N6Nwl+SCzwf/ro57LKFXVQ1X1E8BtzJa+WvVvgV+vqtODesMm/tj6BjMDXNl1fAVwZERz0QaT5N3M1rNvrqrvjno+G0FVPZbkryfZUVUtPsNnCnggCcw+u+eWJKeq6uG1vqEr/uF7BPjFzu6e9wHfq6qXRj0pjV6SXcCDwEeq6tujns8oJfnxdJKus/NtG9DkD8KquqqqdlfVbuD3gH+8ntAHV/wDl+QgcAOwI8kMcA8wDlBV9wNfBm4BDgM/BD46mpkOx2rXI8lbgWngTcCZJL8GvLOqvj+iKZ83ffy38WngLcBvdTLv1GZ9WFkf1+LnmF0gnQROAH+v62bvptLHtRj8Z27SaylJWoalHklqjMEvSY0x+CWpMQa/JDXG4Jekxhj8ktQYg1+SGmPwS1Jj/j84tLh8tn7GwQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "a,b = iterate(a,b,x,y,1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "继续遍历"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.7678944854569089 0.6665363704212185 0.08000927296574874\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAG/RJREFUeJzt3XtwXOWZ5/Hvo5stW7YlS91tI1uSZVtSE24mAszVl1bFQJgNYac2wyQhm0nGm91chtTEk5CZWqp2/khNeXY2M0XNUK4Z1kXtFPPHxMOmsrPLroWJgQBBXA2RZIyNjWSjblmS5Yvu/ewfLYRxZKtttdTS6d+nylVW98s5T50oPw7Ped/zmrsjIiLBkpftAkREJPMU7iIiAaRwFxEJIIW7iEgAKdxFRAJI4S4iEkAKdxGRAFK4i4gEkMJdRCSACrJ14oqKCq+pqcnW6UVE5qXXXnut291DU43LWrjX1NTQ0tKSrdOLiMxLZnY0nXFqy4iIBJDCXUQkgBTuIiIBpHAXEQkghbuISAAp3EVEAkjhLiISQAp3EZEAUriLiARQ1laoiogE1dNvdLLzmXaO9w1wVWkxO7bVc/+GylmtQeEuIpJBT7/RySN7DjAwMgZAZ98Aj+w5ADCrAa+2jIhIBu18pn0i2D82MDLGzmfaZ7UOhbuISAYd7xu4rM9nisJdRCSDriotvqzPZ4rCXUQkg3Zsq6e4MP9TnxUX5rNjW/2s1qEHqiIiGfTxQ1PNlhERCZj7N1TOephfaMq2jJmtNrN9ZtZqZu+a2R9NMqbBzF4ysyEz+8HMlCoiIulK5859FPhjd3/dzJYAr5nZ/3P335w3pgf4HnD/TBQpIiKXZ8o7d3c/4e6vj//9NNAKVF4wJu7urwIjM1KliIhclsuaLWNmNcAG4JWZKEZERDIj7XA3sxLgZ8DD7t5/JSczs+1m1mJmLYlE4koOISIiaUgr3M2skFSw/6O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AXkcRkZymtoyISAAp3EVEAkjhLiISQAp3EZEAUriLiASQwl1EJIAU7iIiAaRwFxEJoP8P4jTDZ72oFgcAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "a,b = iterate(a,b,x,y,5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.9501078460921074 0.8275889325111171 0.000808072467982241\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzt3Xl4VOXdxvHvQ0ggrAHClpAQ1rAmIAEEV6oVpaigUGutrUvF2vpqW5OyWKWW1i1atdW6K8WibQMBFFHcBYugIGQjCfuShSVAEshCkpnn/YOoSIEkMJMzmbk/15VLMnNyzu1juP1dz5xMjLUWERHxL82cDiAiIp6nchcR8UMqdxERP6RyFxHxQyp3ERE/pHIXEfFDKncRET+kchcR8UMqdxERP9TcqQuHh4fbmJgYpy4vItIkrVu3rsha27mu4xwr95iYGNauXevU5UVEmiRjzM76HKdtGRERP6RyFxHxQyp3ERE/pHIXEfFDKncRET+kchcR8UMqdxERP6RyFxHxQyp3EREvKDpylKoat2PXV7mLiHjY2+mFXPbECp7+eItjGRx7+wEREX9z4MhR7l+SxdsZhcT1aM+Vcd0dy6JyFxHxgHczC7l3USalldUkjY/l9gt70zzIuc0RlbuIyFk4VFbF7DezeDOtgCGR7Zg/dTQ5hYe5KPkTCooriAgLJWl8LJOGRzZqLpW7iMgZei9rD7MWZVJcX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2JjqsR5X167FBmPMWmPM+Y2dsbHUtRbHHTfSGOMyxkw5m+up3M/cXODy0zx/BdCv9mMa8GwjZHLKXE6/FgeBu4DHGiWNs+Zy+rXYDlxkrY0D5uD/e89zOf16fAjEW2uHAbcALzVGKIfM5fRrgTEmCHgEWH62F1O5nyFr7QqOldapXA3Ms8esBsKMMd0bJ13jqmstrLX7rLVfAtWNl8oZ9ViLVdbaQ7WfrgZ6NEowh9RjPY7Yb1/4aw347YuA9egMgP8DFgL7zvZ6KnfviQR2H/d5Xu1jIl+7FXjH6RBOM8ZMNsbkAG9zbHoPSMaYSGAy8Jwnzqdy9x5zksf8diqRhjHGjONYuU93OovTrLWLrLUDgEkc26oKVE8C0621Lk+czG9+QbYPygOijvu8B1DgUBbxIcaYOI7tLV9hrT3gdB5fYa1dYYzpY4wJt9YG4vvOJAD/MsbAsfeamWCMqbHWLj6Tk2ly9543gZ/W3jVzLlBirS10OpQ4yxgTDaQCN1prNzmdx2nGmL6mts1q7ygLAQLyf3jW2l7W2hhrbQywAPjlmRY7aHI/Y8aYN4CLgXBjTB4wGwgGsNY+BywDJgBbgHLgZmeSel9da2GM6QaLHqwgAAAAcUlEQVSsBdoBbmPMr4FB1tpShyJ7TT2+L+4HOgF/r+20Gn9+A616rMe1HBuCqoEK4LrjXmD1K/VYC89ez0/XUUQkoGlbRkTED6ncRUT8kMpdRMQPqdxFRPyQyl1ExA+p3EVE/JDKXUTED6ncRUT80P8Dj4Cmn9uq6zQAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "a,b = iterate(a,b,x,y,10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.9483311054752765 0.8580980023959833 0.0003466528413780967\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBOR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VzkTGmzlo770ReTJN74MwHbjh41swpQJm1dqvTocRZxpgUYA5wvbV2ldN5nGaM6WEOttnBM8qigLD8H561tqu1NtVamwrMAv7nRIsdNLmfMGPMG8BZQKIxZgvwIBAJYK2dCrwLXASsAfYDNzmTNPCOtRbGmA7AYqAl4DPG3An0tdaWOxQ5YBrwffEA0Ab4v4OdVufmC2iJhCbAAAAAT0lEQVQ1YD2u4sAQVAtUAj895A1WV2nAWvh3fy5dRxGRsKbDMiIiLqRyFxFxIZW7iIgLqdxFRFxI5S4i4kIqdxERF1K5i4i4kMpdRMSF/j8U8WaOqCqXgwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "a,b = iterate(a,b,x,y,100)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.8505560785076288 0.9710872023538262 0.00010710264569567503\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAD8CAYAAABw1c+bAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzt3Xl4VOX5xvHvQ0ggEEjAsAZC2GQnoBFcWosr7qBFrVat2JburS0i4lKtVquitlqtFiv1Z+tSdnFF3Ip7BSEJ+44kASJLCEsg2/P7I6NNMcAEJjlJ5v5cVy6SOe+cuXNI7rw5czKvuTsiIhI9GgUdQEREapeKX0Qkyqj4RUSijIpfRCTKqPhFRKKMil9EJMqo+EVEooyKX0Qkyqj4RUSiTOOgA1QlOTnZ09LSgo4hIlJvLFiwYKu7twlnbJ0s/rS0NObPnx90DBGResP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KqPhFRKKMil9EJMqo+EVEooyKX0Qkyqj4RUSijIpfRCTKqPhFRKLM/wN1jfkrtuAiLwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "a,b = iterate(a,b,x,y,1000)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.7884707126333258 1.042833291685438 6.454779324956897e-05\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAD8CAYAAABw1c+bAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzt3Xl4VfW59vHvAwQSpjAjJASQIcgoEgWLVuoEWifw1B5tqaWlvJxjj/WytQHFOrcofT3aYyvFiXqc3tYERKqi1CpKKQqCmUg0EoUMGBFIgCSQZD/vH4kaaYAd2OydZN+f68pFstdvr31nEe4s1l7rt8zdERGR6NEm0gFERCS8VPwiIlFGxS8iEmVU/CIiUUbFLyISZVT8IiJRRsUvIhJlVPwiIlFGxS8iEmXaRTpAY3r16uWDBg2KdAwRkRZj48aNO929dzBjm2XxDxo0iA0bNkQ6hohIi2FmnwQ7Vod6RESijIpfRCTKqPhFRKLMUYvfzAaY2d/NbIuZZZvZzxoZM8LM1pnZATP7xSHLPjazTDPbbGY6cC8iEmHBvLlbA/zc3d8zsy7ARjN7zd1zGozZBVwPXHGYdXzL3XceZ1YREQmBo+7xu3uJu79X//leYAuQcMiYUnd/F6g+ISlFRCRkmnSM38wGAeOB9U14mgOvmtlGM5vTlNcTEZHQC/o8fjPrDKQBN7h7eRNeY7K7F5tZH+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jruPBe6idR/rXsqRt8XfgHHufirwI+DRcISKkKUceVtgZm2Be4FVoXhBFX+Iufsa6srscC4HnvQ6/wS6mVm/8KQLv6NtD3cvdfd3gerwpYqMILbFP9x9d/2X/wQSwxIsAoLYFvv8qzcgOwGt9s3IIDoD4L+ANKA0FK+p4g+/BGB7g68L6x8TaejHwMuRDhFJZjbdzHKBv1K31x+VzCwBmA4sDtU6VfzhZ4081mr3ZqTpzOxb1BV/aqSzRJK7L3P3EcAV1B36ilYPAKnuXhuqFbYL1YokaIXAgAZfJwLFEcoizYyZjaXuePZF7v55pPM0B+6+xsyGmFkvd4/GOXxSgOfMDOrm7rnYzGrcffmxrlB7/OG3AvhB/dk9k4Aydy+JdCiJPDNLAtKBme7+QaTzRJKZDbX6pqs/8609EJW/CN19sLsPcvdBwPPAfx5P6YP2+EPOzJ4FpgC9zKwQuA2IAXD3xcBLwMVAPlABzIpM0vA42vYws5OADUBXIGBmNwAj3b08QpFPmCB+Nn4F9AT+UN95Na11srIgtsWV1O0gVQOVwHcbvNnbqgSxLUL/mq10W4qIyGHoUI+ISJRR8YuIRBkVv4hIlFHxi4hEGRW/iEiUUfGLiEQZFb+ISJRR8YuIRJn/D83zu7UF9gJ7AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "a,b = iterate(a,b,x,y,10000)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 模型评价\n",
    "计算R平方"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(0.06889736799999996, 0.06825272967982761, 0.0006454779324956859)"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y_hat=model(a,b,x)\n",
    "y_bar = y.mean()\n",
    "SST = np.square(y - y_bar).sum()\n",
    "SSR = np.square(y_hat - y_bar).sum()\n",
    "SSE = np.square(y_hat - y).sum()\n",
    "SST, SSR, SSE"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[2.13518062],\n",
       "       [2.00579257],\n",
       "       [1.9108607 ],\n",
       "       [1.88294884],\n",
       "       [1.79211701]])"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y_hat"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 0.00198062],\n",
       "       [-0.01040743],\n",
       "       [-0.0029393 ],\n",
       "       [ 0.02084884],\n",
       "       [-0.00948299]])"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\n",
    "y_hat-y"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "证明 SST=SSR+SSE"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "-8.396123233360073e-07"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "error = SST - SSR -SSE\n",
    "error"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.9906434985996512"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "R_Square = SSR/SST\n",
    "R_Square"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 附录1 损失函数的微分（可选）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "import sympy"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [],
   "source": [
    "a = sympy.Symbol(\"a\")\n",
    "b = sympy.Symbol(\"b\")\n",
    "x = sympy.Symbol(\"x\")\n",
    "y = sympy.Symbol(\"y\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [],
   "source": [
    "f_cost = 1.0/2 * (y - a*x - b)**2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.5*(-a*x - b + y)**2"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "f_cost"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "-1.0*x*(-a*x - b + y)"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sympy.diff(f_cost,a)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1.0*a*x + 1.0*b - 1.0*y"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sympy.diff(f_cost,b)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
